import request from "@/utils/request";

// 获取项目列表
// 1：商机填写；2：指定解决方案经理；3：上传解决方案； * 4：方案会审；
// 5：商机转化；6：投标评审；7：投标评审抄送；8：投标； * 9：合同拟稿；
// 10：合同拟稿审核；11：合同拟稿审核通过；12：合同定稿； * 13：甲方签章；
// 14：合同归档；15：项目交底；16、项目启动；17：向后采购； * 18：交付实施；
// 19、交付资料稽查；20：客户经理逆向评价：21：项目归档
export function getProjectStatusList(params) {
  return request({
    url: "/system/project/getStateList",
    method: "get",
    params,
  });
}

// 上传解决方案
export function uploadSolution(params) {
  return request({
    url: "/system/project/uploadSolationFile",
    method: "post",
    params,
  });
}

// 项目详情
export function getProjectDetail(id) {
  return request({
    url: `/system/project/${id}`,
    method: "get",
  });
}

// 选择签约模式 商机转化
export function boConversion(params) {
  return request({
    url: "/system/project/boConversion",
    method: "post",
    params,
  });
}

// 投标评审
export function biddingApprove(data) {
  return request({
    url: "/system/project/biddingApprove",
    method: "post",
    data,
  });
}

// 投标
export function bidding(data) {
  return request({
    url: "/system/project/bidding",
    method: "post",
    data,
  });
}

// 合同拟稿
export function draftContract(data) {
  return request({
    url: "/system/project/draftContract",
    method: "post",
    data,
  });
}

// 合同拟稿审核
export function approveDraftContract(params) {
  return request({
    url: "/system/project/approveDraftContract",
    method: "post",
    params,
  });
}

// 获取待审核合同拟稿
export function toApproveDraftContract(boId) {
  return request({
    url: "/system/project/toApproveDraftContract",
    method: "get",
    params: { boId },
  });
}
// 合同定稿
export function confirmContract(params) {
  return request({
    url: "/system/project/contract",
    method: "post",
    params,
  });
}

// bu 甲方签章
export function aSign(params) {
  return request({
    url: "/system/project/aSign",
    method: "post",
    params,
  });
}

// 合同归档
export function contractFilling(data) {
  return request({
    url: "/system/project/contractFilling",
    method: "post",
    data,
  });
}

// 项目交底
export function projectDisclosure(params) {
  return request({
    url: "/system/project/projectDisclosure",
    method: "post",
    params,
  });
}

// 项目启动
export function projectStart(params) {
  return request({
    url: "/system/project/projectStart",
    method: "post",
    params,
  });
}

// 后项合同流转
export function downContractCirculation(data) {
  return request({
    url: "/system/project/downContractCirculation",
    method: "post",
    data,
  });
}

// 后项采购实施
export function downProcurementImplement(data) {
  return request({
    url: "/system/project/downProcurementImplement",
    method: "post",
    data,
  });
}
// 后项采购准备
export function downProcurementReady(data) {
  return request({
    url: "/system/project/downProcurementReady",
    method: "post",
    data,
  });
}

// 交付实施
export function deliveryImplement(data) {
  return request({
    url: "/system/project/deliveryImplement",
    method: "post",
    data,
  });
}

// 获取项目的交付实施
export function getDeliveryImplement(boId) {
  return request({
    url: "/system/project/getDeliveryImplement",
    method: "get",
    params: { boId },
  });
}

// 交付稽查
export function deliveryCheck(data) {
  return request({
    url: "/system/project/deliveryCheck",
    method: "post",
    data,
  });
}


// 评价
export function linkScore(data) {
  return request({
    url: "/system/project/linkScore",
    method: "post",
    data,
  });
}

// 项目归档
export function projectFilling(data) {
  return request({
    url: "/system/project/projectFilling",
    method: "post",
    data,
  });
}
